package inherit;

class Base {
    int a;
    int b;
}
public class Derived extends Base{
    int c;
    int a;
    public void Method() {
        this.a = 1;
        this.b = 2;
        this.c = 3;
    }

    public static void main(String[] args) {
        Derived derived = new Derived();
        derived.Method();
        System.out.println(derived.a);
        System.out.println(derived.b);
        System.out.println(derived.c);

        Base base = new Base();
        System.out.println(base.a);
    }
}
